<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no"/>
    <link href="css/iSlider.css" rel="stylesheet">
    <style>
        body {
            margin: 0;
            padding: 0;
            //background: #333;
            overflow: hidden;
        }

        /*ul wrapper*/
        #iSlider-wrapper {
            height: 100%;
            width: 100%;
            overflow: hidden;
            position: absolute;
            z-index: 100;
            background-color: black;
           top: 0px;
        }
        .close{
            z-index: 102;
            position: absolute;
            right: 4px;
            top: 6px;
            width: 25px;
        }

        #iSlider-wrapper ul {
            list-style: none;
            margin: 0;
            padding: 0;
            height: 100%;
            overflow: hidden;
        }

        #iSlider-wrapper li {
            position: absolute;
            margin: 0;
            padding: 0;
            height: 100%;
            overflow: hidden;
            display: -webkit-box;
            -webkit-box-pack: center;
            -webkit-box-align: center;
            list-style: none;
        }
        #iSlider-wrapper li img {
            max-width: 100%;
            max-height: 100%;
        }
    </style>
</head>
<body>
<button onclick="showImage();">show Image</button>
<div id="iSlider-wrapper">
    <img class="close" src="img/close_32px_1145070_easyicon.net.png" alt="close"/>
</div>
<script src="//cdn.bootcss.com/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript" src="js/iSlider.js"></script>
<script type="text/javascript" src="js/iSlider.plugin.zoompic.js"></script>
<script>
    var list = [
        {content: "img/5186867718_06b2e9e551_m.jpg"},
        {content: "img/5578283926_822e5e5791_m.jpg"},
        {content: "img/5697107145_3c27ff3cd1_m.jpg"},
        {content: "img/6176698785_7dee72237e_m.jpg"},
    ];
    var S = new iSlider({
        dom: document.getElementById('iSlider-wrapper'),
        data: list,
        isLooping: 1,
        isOverspread: false,
        animateTime: 800, // ms
        //fillSeam:true,
        plugins: [['zoompic', {zoomFactor: 3}]]
    });
    list = [
        {content: "img/5186867718_06b2e9e551_m.jpg"},
    ];
    setTimeout(function(){
        list.push({content: "http://be-fe.github.io/static/images/iSlider-card/6.jpg"});
        S.loadData(list);
    },2000)
    $(".close").click(function () {
        $("#iSlider-wrapper").toggle();
    });
    function showImage(){
        $("#iSlider-wrapper").toggle();
        S.slideTo(2);
    }
</script>
</body>
</html>